#ifndef FORTRESS_MONSTER_H
#define FORTRESS_MONSTER_H

#include <list>
#include <utility>
#include <fstream>

#include <boost/archive/binary_oarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/serialization/list.hpp>
#include <boost/serialization/utility.hpp>

namespace fortress
{
	
	class map;
	class messageController;
	class character;
	typedef std::pair<character*,bool> storedMonster;

	class monster
	{
	
	private:
		friend class boost::serialization::access;
		template<class Archive>
		void serialize(Archive & ar, const unsigned int version);
		// I'm definately going to want to convert this to a map for looking up which monsters to use
		std::list<storedMonster> controlled;	// Everything this AI controls
		messageController & messages;
		map * currentMap;
		void dummy();

	public:
		monster();
		~monster();
		void insert(character*);	// Add "intelligent" monsters, which move even when they are not on screen
		void remove(character const *);	// Remove from the intelligent monster list
		void takeTurn(character * sameMap);
		void setMap(map * newMap) { currentMap = newMap; };
	};
};
#endif